function DinoJumpRoutine takes nothing returns nothing
	local timer jumpTimer = GetExpiredTimer()
	local integer jumpTimerId = GetHandleId(jumpTimer)
	local unit jumper = LoadUnitHandle(udg_HT , jumpTimerId , 3)
	local location jumperLocation = GetUnitLoc(jumper)
	local real jumperX = GetLocationX(jumperLocation)
	local real jumperY = GetLocationY(jumperLocation) 
	local real dx = LoadReal(udg_HT , jumpTimerId , 4)
	local real dy = LoadReal(udg_HT , jumpTimerId , 5)
	local real process = LoadReal(udg_HT , jumpTimerId , 6)
	local location newLocation = null
	local boolean end = false
	//--
	if process < LoadReal(udg_HT , jumpTimerId , 7) then
		set process = process + 1.0
		call SaveReal(udg_HT , jumpTimerId , 6 , process)
		set newLocation = Location(jumperX + dx , jumperY + dy)
		call SetUnitPositionLoc(jumper , newLocation)

	else
		call SetUnitAnimationByIndex(jumper , 1)
		set end = true
	endif
	if end then
		call PauseTimer(jumpTimer)
		call FlushChildHashtable(udg_HT , jumpTimerId)
		call DestroyTimer(jumpTimer)
		call PauseUnit(jumper , false)
		call SetUnitTimeScale(jumper , 1.0)
		call SetUnitPathing(jumper , true)
	endif
	//--
	call RemoveLocation(jumperLocation)
	call RemoveLocation(newLocation)
	set jumpTimer = null
	set jumper = null
	set jumperLocation = null
	set newLocation = null
endfunction

function Trig_DinoJump_Actions takes nothing returns nothing
	local unit jumper = GetTriggerUnit()
	local location jumperLocation = GetUnitLoc(jumper)
	local real jumperX = GetLocationX(jumperLocation)
	local real jumperY = GetLocationY(jumperLocation)
	local location spellTargetLocation = GetSpellTargetLoc()
	local real angle = AngleBetweenPoints(jumperLocation , spellTargetLocation)
	local real distance = DistanceBetweenPoints(jumperLocation , spellTargetLocation)
	local real delta = 900.0 * 0.01 // speed setting
	local real dx = Cos(angle * bj_DEGTORAD) * delta
	local real dy = Sin(angle * bj_DEGTORAD) * delta
	local timer jumpTimer = CreateTimer()
	local integer jumpTimerId = GetHandleId(jumpTimer)
	//--
	call SaveUnitHandle(udg_HT , jumpTimerId , 3 , jumper)
	call SaveReal(udg_HT , jumpTimerId , 4 , dx)
	call SaveReal(udg_HT , jumpTimerId , 5 , dy)
	call SaveReal(udg_HT , jumpTimerId , 6 , 0.0) // process
	call SaveReal(udg_HT , jumpTimerId , 7 , distance / delta) // process MAX
	call TimerStart(jumpTimer , 0.01 , true , function DinoJumpRoutine)
	call PauseUnit(jumper , true)
	call SetUnitTimeScale(jumper , (900.0 * 1.1) / (distance + 100.0))
	call SetUnitPathing(jumper , false)
	call SetUnitAnimationByIndex(jumper , 6)
	//--
	call RemoveLocation(jumperLocation)
	call RemoveLocation(spellTargetLocation)
	set jumper = null
	set jumperLocation = null
	set spellTargetLocation = null
	set jumpTimer = null
endfunction

function Trig_DinoJump_Conditions takes nothing returns boolean
	return GetSpellAbilityId() == 'A00I'
endfunction

function InitTrig_DinoJump takes nothing returns nothing
	set gg_trg_DinoJump = CreateTrigger()
	call TriggerRegisterAnyUnitEventBJ(gg_trg_DinoJump , EVENT_PLAYER_UNIT_SPELL_EFFECT)
	call TriggerAddCondition(gg_trg_DinoJump , Condition( function Trig_DinoJump_Conditions))
	call TriggerAddAction(gg_trg_DinoJump , function Trig_DinoJump_Actions)
endfunction